#pragma once

#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h>
#include <CGAL/Boolean_set_operations_2/Gps_default_dcel.h>
#include <CGAL/Polygon_set_2.h>
#include <CGAL/Arrangement_2.h>
#include <CGAL/intersections.h>
#include <list>
#include <iostream>

/*******************************************************************************************
 * This file contatins basic typedefs (from CGAL and more).
 *******************************************************************************************/

typedef CGAL::Gmpq                                  Number_type;
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::Point_2								Point;
typedef Kernel::Segment_2							Segment;
typedef CGAL::Arr_segment_traits_2<Kernel>          Traits_2;
typedef CGAL::Arrangement_2<Traits_2>               Arrangement;
typedef CGAL::Arrangement_2<Traits_2>::Vertex_iterator               Vertex_iterator;
typedef CGAL::Arr_default_overlay_traits<Arrangement>  Overlay_traits;
typedef Kernel::Line_2								Line;
typedef Kernel::Ray_2								Ray;
typedef Kernel::Vector_2							Vector;
typedef Kernel::Direction_2							Direction;
typedef CGAL::Polygon_2<Kernel>                     Polygon;
typedef CGAL::Polygon_with_holes_2<Kernel>          Polygon_with_holes;
typedef CGAL::Polygon_set_2<Kernel>					Polygon_set;
typedef std::list<Polygon_with_holes>				Polygon_with_holes_container;

typedef std::vector<Point>							PointsVector;

class Exception
{
public:
	Exception(const std::string& msg):_msg(msg) {}
	const std::string& get_message() const {return _msg;}

private:
	const std::string _msg;
};

class Triangle
{
public:
	Triangle(const Point& p1, const Point& p2, const Point& p3):_p1(p1),_p2(p2),_p3(p3) {}
	void print_triangle() {std::cout << _p1 << " , " << _p2 << " , " << _p3 << std::endl;}

private:
	Point _p1;
	Point _p2;
	Point _p3;
};

